import Vue from 'vue'
import Router from 'vue-router'
import Home from './views/Home.vue'

Vue.use(Router)


export default new Router({
	// base: process.env.BASE_URL,
	// mode: 'history',
	routes: [
		// 前台路由开始
		{
			  path: '/',
			  name: 'main/index',
			  component: () => import('./views/main/index.vue'),
		},
		{
			  path: '/distribut',
			  name: 'distribut',
			  component: () => import('@/views/main/distribut'),
		},
		{
			  path: '/oem',
			  name: 'oem',
			  component: () => import('@/views/main/oem'),
		},
		{
			  path: '/login',
			  name: 'login',
			  component: () => import('@/views/login/login')
		},
		{
			  path: '/regist',
			  name: 'regist',
			  component: () => import('@/views/login/regist')
		},
		{
			  path: '/forget',
			  name: 'forget',
			  component: () => import('@/views/login/forget')
		},
		{
			  path: '/main',
			  name: '/main',
			  component: () => import('./views/main/main.vue'),
		},
		
		// 前台路由开始结束
		
		{ //后台管理的路由
			path: '/admin',
			name: 'admin',
			component: () => import('./views/Admin.vue'),
			children:[
				{ //后台首页的路由
					path: '/home',
					name: 'home',
					component: Home,
				},
				//Bus系列的路由
				{ 
					path: '/business/article',
					name: 'article',
					component: () => import('./views/business/bus-article.vue')
				},
				{
					path: '/business/zimeiti',
					name: 'zimeiti',
					component: () => import('./views/business/bus-zimeiti.vue')
				},
				{
					path: '/business/weixin',
					name: 'weixin',
					component: () => import('./views/business/bus-weixin.vue')
				},
				{
					path: '/business/weibo',
					name: 'weibo',
					component: () => import('./views/business/bus-weibo.vue')
				},
				{
					path: '/business/video',
					name: 'video',
					component: () => import('./views/business/bus-video.vue')
				},
				{
					path: '/business/redbook',
					name: 'redbook',
					component: () => import('./views/business/bus-redbook.vue')
				},
				//Bus系列的路由结束
				// finance财务管理列表路由
				{
					path: '/finance/account',
					name: 'account',
					component: () => import('./views/finance/fin-account.vue')
				},
				{
					path: '/finance/recharge',
					name: 'recharge',
					component: () => import('./views/finance/fin-recharge.vue')
				},
				{
					path: '/finance/safe',
					name: 'safe',
					component: () => import('./views/finance/fin-safe.vue')
				},
				// finance财务管理列表路由结束
				// order订单列表路由
				{
					path: '/order/article',
					name: 'article',
					component: () => import('./views/order/order-article.vue')
				},
				{
					path: '/order/zimeiti',
					name: 'zimeiti',
					component: () => import('./views/order/order-zimeiti.vue')
				},
				{
					path: '/order/weixin',
					name: 'weixin',
					component: () => import('./views/order/order-weixin.vue')
				},
				{
					path: '/order/weibo',
					name: 'weibo',
					component: () => import('./views/order/order-weibo.vue')
				},
				{
					path: '/order/video',
					name: 'video',
					component: () => import('./views/order/order-video.vue')
				},
				{
					path: '/order/redbook',
					name: 'redbook',
					component: () => import('./views/order/order-redbook.vue')
				},
				// order订单列表路由结束
				// source素材列表路由
				{
					path: '/source/file',
					name: 'file',
					component: () => import('./views/source/sou-file.vue')
				},
				{
					path: '/source/creatfile',
					name: 'creatfile',
					component: () => import('./views/source/sou-addfile.vue')
				},
				{
					path: '/oem/index',
					name: 'oemIndex',
					component: () => import('./views/oem/index.vue')
				},
				// personalType
				{
					path: '/medium/personal',
					name: 'personal',
					component: () => import('./views/medium/personal.vue')
				},
				{
					path: '/medium/accountSecurity',
					name: 'accountSecurity',
					component: () => import('./views/medium/accountSecurity.vue')
				},
				{
					path: '/medium/financialStatements',
					name: 'financialStatements',
					component: () => import('./views/medium/financialStatements.vue')
				},
				{
					path: '/medium/orderPage/:orderType',
					name: 'orderPage',
					component: () => import('./views/medium/orderPage.vue')
				},
				{
					path: '/medium/importRecord',
					name: 'importRecord',
					component: () => import('./views/medium/importRecord.vue')
				},
				{
					path: '/medium/softResources',
					name: 'softResources',
					component: () => import('./views/medium/softResources.vue')
				},
				{
					path: '/order/order-place/:pid',
					name: 'order-place',
					component: () => import('./views/order/order-place.vue')
				},
				{
					path: '/source/addResource/:pid',
					name: 'addResource',
					component: () => import('./views/source/addResource.vue')
				},
				/*资源添加编辑路由*/
				{
					path: '/resources/publicNumber/:pid',
					name: 'publicNumber',
					component: () => import('./views/resources/publicNumber.vue')
				},
				{
					path: '/resources/selfMedia/:pid',
					name: 'selfMedia',
					component: () => import('./views/resources/selfMedia.vue')
				},
				{
					path: '/resources/smallRedBook/:pid',
					name: 'smallRedBook',
					component: () => import('./views/resources/smallRedBook.vue')
				},
				{
					path: '/resources/softText/:pid',
					name: 'softText',
					component: () => import('./views/resources/softText.vue')
				},
				{
					path: '/resources/video/:pid',
					name: 'video',
					component: () => import('./views/resources/video.vue')
				},
				{
					path: '/resources/weibo/:pid',
					name: 'weibo',
					component: () => import('./views/resources/weibo.vue')
				},
				{
					path: '/repay/repay',
					name: 'repay',
					component: () => import('./views/repay/repay.vue')
				},
				
				// source素材列表路由结束
			]
			
		},
		{
			path: '/sourec/sourec/:id',
			name: 'sourec',
			component: () => import('./views/sourec/sourec.vue')
		},
		{
			path: '/business/sourec/:id',
			name: 'z-sourec',
			component: () => import('./views/business/z-sourec.vue')
		},
		{
			path: '/business/sourec01/:id',
			name: 'z-sourec',
			component: () => import('./views/business/z-sourec01.vue')
		},
		{
			path: '/business/sourec02/:id',
			name: 'z-sourec',
			component: () => import('./views/business/z-sourec02.vue')
		},
		{
			path: '/business/sourec03/:id',
			name: 'z-sourec',
			component: () => import('./views/business/z-sourec03.vue')
		},
		{
			path: '/business/sourec04/:id',
			name: 'z-sourec',
			component: () => import('./views/business/z-sourec04.vue')
		},
		{
			path: '/business/sourec05/:id',
			name: 'z-sourec',
			component: () => import('./views/business/z-sourec05.vue')
			
		},
		{
			path: '/sourec/preview/:id',
			name: 'preview',
			component: () => import('./views/sourec/preview.vue')	
		}
		
	]
})
